const log4js = require('log4js');
log4js.configure({
    appenders: {
        out: {type: 'stdout'},
        app: {type: 'file', filename: 'application.log'}
    },
    categories: {
        default: {appenders: ['out', 'app'], level: 'debug'}
    },
});
var dateFileLog = log4js.getLogger('dateFileLog');
exports.logger = dateFileLog;

exports.use = function(app){
    //app.use(log4js.connectLogger(dateFileLog, {level:'INFO', format:':method :url'}));
    app.use(log4js.connectLogger(dateFileLog, {level:'auto', format:':method :url'}));
}
